// components/loading/loading.ts
Component({

  /**
   * 组件的属性列表
   */
  properties: {
    style: {
      type: String,
      value: ''
    },
    visible: {
      type: Boolean,
      value: true,
      observer(a: boolean, b: boolean) {
        // console.log(a, b)
      }
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    statusBarHeight: 0
  },
  attached() {
    wx.getSystemInfo({
      success: (res) => {
        let statusBarHeight = res.statusBarHeight
        if (res.platform === "windows" || res.platform === "mac") {
          statusBarHeight = 0
        }

        this.setData({
          statusBarHeight,
        });

      },
    });
  },
  /**
   * 组件的方法列表
   */
  methods: {

  }
})